<?php $this->start('menu') ?>
	<?php echo $this->element('menu', array("str_item" => "contact")); ?>
<?php $this->end() ?>

<div id="products">
	<?php foreach($products as $product){ ?>
	<div class="pro-item">
		<?php $master = $this->Variants->getMasterVariant($product['Product']['id']) ?>
		<a href="#"><?php echo $this->Images->showMedium($master['Image'][0]) ?></a>
		<h2><a href="index.html"><?php echo $product['Product']['name'] ?></a></h2>
		<p><?php echo $product['Product']['short_desc'] ?></p>
		<a class="more" href="index.html">Chi tiết ...</a>
	</div>
	<?php } ?>
</div><!-- end #product -->
<div id="news">
	<div class="main-news">
	<?php if($mainPost){ ?>
		<?php $url = $this->Posts->getSEOLink($mainPost); ?>
		<?php echo $this->Html->link($this->Posts->thumbBig($mainPost), $url, array('escape' => false)) ?>
		<h2><?php echo $this->Html->link($mainPost['Post']['title'], $url, array('escape' => false)) ?></h2>
		<p class='pcontent'><?php echo $mainPost['Post']['description'] ?></p>
		<?php echo $this->Html->link('Chi tiết ...', $url, array('class' => 'more')) ?>
	<?php } ?>
	</div>
	<div class="random-news">
		<?php foreach($randPosts as $post){ ?>
		<?php $url = $this->Posts->getSEOLink($post); ?>
		<div class="news-item">		
			<?php echo $this->Html->link($this->Posts->thumbMedium($post), $url, array('escape' => false)) ?>
			<h2><?php echo $this->Html->link($post['Post']['title'], $url, array('escape' => false)) ?></h2>
		</div>
		<?php } ?>
	</div>
</div><!-- end #news -->
<div id="feature" >
	<div class="theme-default" style="width: 960px; margin-left: 14px;">
		<?php if($slider['Slider']['slide'] == true){ ?>
		<div id="slider_<?php echo $slider['Slider']['id'] ?>" class="slider"> 
			<?php foreach($slider['Image'] as $i => $img){?>
				<?php echo $this->Html->link($this->Images->showSlider($img), array('controller' => 'Roses','action' => 'index'),array('escape' => false)) ?>
			<?php } ?>
		</div>
		<?php } ?>
	</div>
</div><!-- end Feature -->

<?php $this->start('script') ?>
	<?php echo $this->Html->script('jquery.nivo.slider'); ?>
	<script type='text/javascript'>
		$(document).ready(function() {		
			$('.slider').nivoSlider({effect: 'random', pauseTime: 10000, });
		});
	</script>
<?php $this->end() ?>

<?php $this->start('css') ?>
	<?php echo $this->Html->css('nivo-slider/nivo-slider'); ?>
	<?php echo $this->Html->css('nivo-slider/default'); ?>
<?php $this->end() ?>




